import axios from 'axios'
axios.defaults.baseURL='https://restapi.amap.com/v3/geocode/geo?key=bd4adce5561e1fdba1fd47b7dd3f77bd&address='/* 配置默认请求头 */

/* 响应拦截器 */
axios.interceptors.response.use(
    function (response) {
        return response.data/* 响应成功.返回数据 */
    },
    function (error) {
        return Promise.reject(error )
    }
)

/* 配置基类 的Http请求 */
const Http=url=>{
    return axios({
        url,
        method:'get'
    })
}
export {Http}


